# coding=utf-8
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: smith/experiment_config.proto
"""Generated protocol buffer code."""
from npu_bridge.npu_init import *
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()




DESCRIPTOR = _descriptor.FileDescriptor(
  name='smith/experiment_config.proto',
  package='smith',
  syntax='proto2',
  serialized_options=None,
  create_key=_descriptor._internal_create_key,
  serialized_pb=b'\n\x1dsmith/experiment_config.proto\x12\x05smith\"\xd5\x02\n\x0fTrainEvalConfig\x12\x1c\n\x14input_file_for_train\x18\x01 \x01(\t\x12\x1b\n\x13input_file_for_eval\x18\x02 \x01(\t\x12\x1c\n\x10train_batch_size\x18\x04 \x01(\x05:\x02\x33\x32\x12\x1b\n\x0f\x65val_batch_size\x18\x05 \x01(\x05:\x02\x33\x32\x12\x1e\n\x12predict_batch_size\x18\x06 \x01(\x05:\x02\x33\x32\x12\x1b\n\x0emax_eval_steps\x18\x07 \x01(\x05:\x03\x31\x30\x30\x12$\n\x16save_checkpoints_steps\x18\x08 \x01(\x05:\x04\x31\x30\x30\x30\x12!\n\x13iterations_per_loop\x18\t \x01(\x05:\x04\x31\x30\x30\x30\x12!\n\x13\x65val_with_eval_data\x18\n \x01(\x08:\x04true\x12#\n\x18neg_to_pos_example_ratio\x18\x0c \x01(\x02:\x01\x31\"\xc8\x04\n\rEncoderConfig\x12&\n\nmodel_name\x18\x0c \x01(\t:\x12smith_dual_encoder\x12\x17\n\x0finit_checkpoint\x18\x01 \x01(\t\x12\x1a\n\x12predict_checkpoint\x18\x02 \x01(\t\x12\x18\n\x10\x62\x65rt_config_file\x18\x03 \x01(\t\x12\x1c\n\x14\x64oc_bert_config_file\x18\x04 \x01(\t\x12\x12\n\nvocab_file\x18\x05 \x01(\t\x12\x1a\n\x0emax_seq_length\x18\x06 \x01(\x05:\x02\x33\x32\x12\"\n\x17max_predictions_per_seq\x18\x07 \x01(\x05:\x01\x35\x12#\n\x17max_sent_length_by_word\x18\x08 \x01(\x05:\x02\x33\x32\x12&\n\x1amax_doc_length_by_sentence\x18\t \x01(\x05:\x02\x36\x34\x12$\n\x18loop_sent_number_per_doc\x18\n \x01(\x05:\x02\x36\x34\x12!\n\x13sent_bert_trainable\x18\x0b \x01(\x08:\x04true\x12\"\n\x17max_masked_sent_per_doc\x18\x0e \x01(\x05:\x01\x32\x12*\n\x1buse_masked_sentence_lm_loss\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x15\n\nnum_labels\x18\r \x01(\x05:\x01\x32\x12$\n\x14\x64oc_rep_combine_mode\x18\x10 \x01(\t:\x06normal\x12+\n\x1e\x64oc_rep_combine_attention_size\x18\x11 \x01(\x05:\x03\x32\x35\x36\"3\n\nLossConfig\x12%\n\x1asimilarity_score_amplifier\x18\x01 \x01(\x02:\x01\x36\"\x9c\x01\n\x11\x44ualEncoderConfig\x12,\n\x0e\x65ncoder_config\x18\x01 \x01(\x0b\x32\x14.smith.EncoderConfig\x12\x31\n\x11train_eval_config\x18\x02 \x01(\x0b\x32\x16.smith.TrainEvalConfig\x12&\n\x0bloss_config\x18\x03 \x01(\x0b\x32\x11.smith.LossConfig'
)




_TRAINEVALCONFIG = _descriptor.Descriptor(
  name='TrainEvalConfig',
  full_name='smith.TrainEvalConfig',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='input_file_for_train', full_name='smith.TrainEvalConfig.input_file_for_train', index=0,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='input_file_for_eval', full_name='smith.TrainEvalConfig.input_file_for_eval', index=1,
      number=2, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='train_batch_size', full_name='smith.TrainEvalConfig.train_batch_size', index=2,
      number=4, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=32,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='eval_batch_size', full_name='smith.TrainEvalConfig.eval_batch_size', index=3,
      number=5, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=32,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='predict_batch_size', full_name='smith.TrainEvalConfig.predict_batch_size', index=4,
      number=6, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=32,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='max_eval_steps', full_name='smith.TrainEvalConfig.max_eval_steps', index=5,
      number=7, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=100,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='save_checkpoints_steps', full_name='smith.TrainEvalConfig.save_checkpoints_steps', index=6,
      number=8, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=1000,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='iterations_per_loop', full_name='smith.TrainEvalConfig.iterations_per_loop', index=7,
      number=9, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=1000,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='eval_with_eval_data', full_name='smith.TrainEvalConfig.eval_with_eval_data', index=8,
      number=10, type=8, cpp_type=7, label=1,
      has_default_value=True, default_value=True,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='neg_to_pos_example_ratio', full_name='smith.TrainEvalConfig.neg_to_pos_example_ratio', index=9,
      number=12, type=2, cpp_type=6, label=1,
      has_default_value=True, default_value=float(1),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto2',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=41,
  serialized_end=382,
)


_ENCODERCONFIG = _descriptor.Descriptor(
  name='EncoderConfig',
  full_name='smith.EncoderConfig',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='model_name', full_name='smith.EncoderConfig.model_name', index=0,
      number=12, type=9, cpp_type=9, label=1,
      has_default_value=True, default_value=b"smith_dual_encoder".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='init_checkpoint', full_name='smith.EncoderConfig.init_checkpoint', index=1,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='predict_checkpoint', full_name='smith.EncoderConfig.predict_checkpoint', index=2,
      number=2, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='bert_config_file', full_name='smith.EncoderConfig.bert_config_file', index=3,
      number=3, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='doc_bert_config_file', full_name='smith.EncoderConfig.doc_bert_config_file', index=4,
      number=4, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='vocab_file', full_name='smith.EncoderConfig.vocab_file', index=5,
      number=5, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='max_seq_length', full_name='smith.EncoderConfig.max_seq_length', index=6,
      number=6, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=32,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='max_predictions_per_seq', full_name='smith.EncoderConfig.max_predictions_per_seq', index=7,
      number=7, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=5,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='max_sent_length_by_word', full_name='smith.EncoderConfig.max_sent_length_by_word', index=8,
      number=8, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=32,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='max_doc_length_by_sentence', full_name='smith.EncoderConfig.max_doc_length_by_sentence', index=9,
      number=9, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=64,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='loop_sent_number_per_doc', full_name='smith.EncoderConfig.loop_sent_number_per_doc', index=10,
      number=10, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=64,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='sent_bert_trainable', full_name='smith.EncoderConfig.sent_bert_trainable', index=11,
      number=11, type=8, cpp_type=7, label=1,
      has_default_value=True, default_value=True,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='max_masked_sent_per_doc', full_name='smith.EncoderConfig.max_masked_sent_per_doc', index=12,
      number=14, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=2,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='use_masked_sentence_lm_loss', full_name='smith.EncoderConfig.use_masked_sentence_lm_loss', index=13,
      number=15, type=8, cpp_type=7, label=1,
      has_default_value=True, default_value=False,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='num_labels', full_name='smith.EncoderConfig.num_labels', index=14,
      number=13, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=2,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='doc_rep_combine_mode', full_name='smith.EncoderConfig.doc_rep_combine_mode', index=15,
      number=16, type=9, cpp_type=9, label=1,
      has_default_value=True, default_value=b"normal".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='doc_rep_combine_attention_size', full_name='smith.EncoderConfig.doc_rep_combine_attention_size', index=16,
      number=17, type=5, cpp_type=1, label=1,
      has_default_value=True, default_value=256,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto2',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=385,
  serialized_end=969,
)


_LOSSCONFIG = _descriptor.Descriptor(
  name='LossConfig',
  full_name='smith.LossConfig',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='similarity_score_amplifier', full_name='smith.LossConfig.similarity_score_amplifier', index=0,
      number=1, type=2, cpp_type=6, label=1,
      has_default_value=True, default_value=float(6),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto2',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=971,
  serialized_end=1022,
)


_DUALENCODERCONFIG = _descriptor.Descriptor(
  name='DualEncoderConfig',
  full_name='smith.DualEncoderConfig',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='encoder_config', full_name='smith.DualEncoderConfig.encoder_config', index=0,
      number=1, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='train_eval_config', full_name='smith.DualEncoderConfig.train_eval_config', index=1,
      number=2, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='loss_config', full_name='smith.DualEncoderConfig.loss_config', index=2,
      number=3, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto2',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=1025,
  serialized_end=1181,
)

_DUALENCODERCONFIG.fields_by_name['encoder_config'].message_type = _ENCODERCONFIG
_DUALENCODERCONFIG.fields_by_name['train_eval_config'].message_type = _TRAINEVALCONFIG
_DUALENCODERCONFIG.fields_by_name['loss_config'].message_type = _LOSSCONFIG
DESCRIPTOR.message_types_by_name['TrainEvalConfig'] = _TRAINEVALCONFIG
DESCRIPTOR.message_types_by_name['EncoderConfig'] = _ENCODERCONFIG
DESCRIPTOR.message_types_by_name['LossConfig'] = _LOSSCONFIG
DESCRIPTOR.message_types_by_name['DualEncoderConfig'] = _DUALENCODERCONFIG
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

TrainEvalConfig = _reflection.GeneratedProtocolMessageType('TrainEvalConfig', (_message.Message,), {
  'DESCRIPTOR' : _TRAINEVALCONFIG,
  '__module__' : 'smith.experiment_config_pb2'
  # @@protoc_insertion_point(class_scope:smith.TrainEvalConfig)
  })
_sym_db.RegisterMessage(TrainEvalConfig)

EncoderConfig = _reflection.GeneratedProtocolMessageType('EncoderConfig', (_message.Message,), {
  'DESCRIPTOR' : _ENCODERCONFIG,
  '__module__' : 'smith.experiment_config_pb2'
  # @@protoc_insertion_point(class_scope:smith.EncoderConfig)
  })
_sym_db.RegisterMessage(EncoderConfig)

LossConfig = _reflection.GeneratedProtocolMessageType('LossConfig', (_message.Message,), {
  'DESCRIPTOR' : _LOSSCONFIG,
  '__module__' : 'smith.experiment_config_pb2'
  # @@protoc_insertion_point(class_scope:smith.LossConfig)
  })
_sym_db.RegisterMessage(LossConfig)

DualEncoderConfig = _reflection.GeneratedProtocolMessageType('DualEncoderConfig', (_message.Message,), {
  'DESCRIPTOR' : _DUALENCODERCONFIG,
  '__module__' : 'smith.experiment_config_pb2'
  # @@protoc_insertion_point(class_scope:smith.DualEncoderConfig)
  })
_sym_db.RegisterMessage(DualEncoderConfig)


# @@protoc_insertion_point(module_scope)

